{include file="header.html"}
<script type="text/javascript">
    $(function(){
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>
<div id="rightTop">
    <p>{$lang.course}</p>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get">
            <div class="left">
                <input type="hidden" name="app" value="courseqa" />
                <input type="hidden" name="act" value="index" />
                <select class="querySelect" name="field">{html_options options=$search_options selected=$smarty.get.field}
                </select><input class="queryInput" type="text" name="search_name" value="{$query.search_name|escape}" />
                {$lang.add_time_from} <input class="queryInput2" style="width:70px;" type="text" value="{$query.add_time_from}" id="add_time_from" name="add_time_from" class="pick_date" />
                {$lang.add_time_to} <input class="queryInput2" style="width:70px;" type="text" value="{$query.add_time_to}" id="add_time_to" name="add_time_to" class="pick_date" />
                <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=courseqa">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">
        {include file=page.top.html}
    </div>
    <div class="clear:both;"></div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $courseqas}-->
        <tr class="tatr1">
            <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
            <td width="15%">{$lang.course_name}</td>
            <td width="15%">{$lang.question}</td>
            <td width="15%">{$lang.answer}</td>
            <td>{$lang.title}</td>
            <td width="10%" style="text-align: center;">{$lang.add_time}</td>
            <td style="text-align: center;">{$lang.is_show}</td>
            <td>{$lang.user_name} | {$lang.real_name}</td>
            <td style="text-align: center;">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$courseqas item=courseqa}-->
        <tr class="tatr2">
            <td class="firstCell"><!--{if !$courseqa.code}--><input type="checkbox" class="checkitem" value="{$courseqa.qa_id}"/><!--{/if}--></td>
            <td>{$courseqa.course_name|escape|default:-}</td>
            <td>{$courseqa.question|escape|default:-}</td>
            <td>{$courseqa.answer|escape|default:-}</td>
            <td>{$courseqa.title|escape|default:-}</td>
            <td style="text-align: center;">{$courseqa.add_time|date:complete}</td>
            <td style="text-align: center;">
                <!-- {if $courseqa.is_show} -->
                <img src="{res file=style/images/positive_enabled.gif}" ectype="inline_edit" fieldname="is_show" fieldid="{$courseqa.qa_id}" fieldvalue="1" title="{$lang.editable}"/>
                <!--{else}-->
                <img src="{res file=style/images/positive_disabled.gif}" ectype="inline_edit" fieldname="is_show" fieldid="{$courseqa.qa_id}" fieldvalue="0" title="{$lang.editable}"/>
                <!-- {/if} -->
            </td>
            <td>{$courseqa.user_name|escape|default:-} | {$courseqa.real_name|escape|default:-}</td>
            <td style="text-align: center;">
                <a href="index.php?app=courseqa&amp;act=edit&amp;id={$courseqa.qa_id}">回复</a>
                <!--{if !$courseqa.code}-->|
                <a href="javascript:drop_confirm('{$lang.drop_confirm}', 'index.php?app=courseqa&amp;act=drop&amp;id={$courseqa.qa_id}');">{$lang.drop}</a><!--{/if}-->
            </td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="7">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <!--{if $courseqas}-->
    <div id="dataFuncs">
        <div class="pageLinks">
            {include file=page.bottom.html}
        </div>
        <div id="batchAction" class="left paddingT15">
            &nbsp;&nbsp;
            <input class="formbtn batchButton" type="button" value="{$lang.drop}" name="id" uri="index.php?app=courseqa&act=drop" presubmit="confirm('{$lang.drop_confirm}');" />
            &nbsp;&nbsp;
            <!--<input class="formbtn batchButton" type="button" value="lang.update_order" name="id" presubmit="updateOrder(this);" />-->
        </div>
        <div class="clear:both;"></div>
    </div>
    <div class="clear"></div>
    <!--{/if}-->
</div>
{include file="footer.html"}
